IF ( (FirstChar = '"') | (FirstChar = '''') ) THEN
SourceDir = STRIP( SourceDir, "B" , FirstChar )
FNameSepPos = LASTPOS( '/' , SourceDir )
IF ( FNameSepPos = 0 ) THEN
FNameSepPos = LASTPOS( ':' , SourceDir )
IF ( FNameSepPos ~= 0 ) THEN
SourceDir = LEFT( SourceDir , FNameSepPos )
ELSE
SourceDir = ""
LOAD_TYPE '"REPLACE"'
Continue2 = FALSE
DO UNTIL ( Continue2 = TRUE )
LOADER '"UNIVERSAL"' Cardname
IF ( RC ~= 0 ) THEN
DO
Text = "Unable to load Card" || Counter ":" || NL || STRIP( Cardname , B , '"' ) || NL || FileMemError
OKAYN '"Error :"' '"'Text'"' '"Retry|Abort"'
IF ( RC = 0 ) THEN
RETURN -1
END
ELSE
Continue2 = TRUE
END
XSIZE
CardXSize = ADPRO_RESULT
YSIZE
CardYSize = ADPRO_RESULT
IF ( ( CardXSize < 88) | ( CardYSize < 130) ) THEN
DO
Text = "Picture size of Card" || Counter ":" || NL || STRIP( Cardname , B , '"' ) || NL || "is too small (=" || CardXSize || "x" || CardYSize || "), should be 88x130 pixels."
OKAYN '"Error :"' '"'Text'"' '"Select new|Abort"'
IF ( RC = 0 ) THEN
RETURN -1
END
ELSE
IF ( ( CardXSize > 88) | ( CardYSize > 130) ) THEN
DO
Text = "Picture size of Card" || Counter ":" || NL || STRIP( Cardname , B , '"' ) || NL || "is too big (=" || CardXSize || "x" || CardYSize || "), should be 88x130 pixels."